#define _CRT_SECURE_NO_WARNINGS 1
#include "BinaryTree.h"
#include "Queue.h"

void test()
{
	BTNode* NodeA = BuyBTNode('A');
	BTNode* NodeB = BuyBTNode('B');
	BTNode* NodeC = BuyBTNode('C');
	BTNode* NodeD = BuyBTNode('D');
	BTNode* NodeE = BuyBTNode('E');
	BTNode* NodeF = BuyBTNode('F');
	BTNode* NodeG = BuyBTNode('G');

	NodeA->left = NodeB;
	NodeA->right = NodeC;
	NodeB->left = NodeD;
	NodeB->right = NodeG;
	NodeC->left = NodeE;
	NodeC->right = NodeF;
	if (BinaryTreeComplete(NodeA))
	{
		printf("是");
	}
	else
	{
		printf("否");
	}
	//PreOrder(NodeA);
	//printf("\nK层节点数量为%d", BinaryTreeLeafKSize(NodeA,3));
	//printf("\n深度为%d\n", BinaryTreeDepth(NodeA));
	//printf("%p", BinaryTreeFind(NodeA, 'E'));
	Destroy(NodeA);
	Destroy(NodeB);
	Destroy(NodeC);
	Destroy(NodeD);
	Destroy(NodeE);
	Destroy(NodeF);
	Destroy(NodeG);

}


int main()
{
	test();
	return 0;
}